<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: logon.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00743.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">logon.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03629_source.html">precomp.h</a>&quot;</code><br />
</div>
<p><a href="a00743_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ad8785904dee45fabf3a42f10fcf9ae8e"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00743.html#ad8785904dee45fabf3a42f10fcf9ae8e">_RegisterLogonProcess</a> (<a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> dwProcessId, BOOL fSecure)</td></tr>
<tr class="separator:ad8785904dee45fabf3a42f10fcf9ae8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7ce92bbcc94e5782cee25bd392cd76b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00743.html#ac7ce92bbcc94e5782cee25bd392cd76b">_LockWindowStation</a> (<a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a> pwinsta)</td></tr>
<tr class="separator:ac7ce92bbcc94e5782cee25bd392cd76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc75d55f583d645253b7b2557a64b8df"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00743.html#adc75d55f583d645253b7b2557a64b8df">_UnlockWindowStation</a> (<a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a> pwinsta)</td></tr>
<tr class="separator:adc75d55f583d645253b7b2557a64b8df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfb4a10a73c8e2e6ae88bf03f0218e17"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00743.html#acfb4a10a73c8e2e6ae88bf03f0218e17">_SetLogonNotifyWindow</a> (<a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a> pwinsta, <a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd)</td></tr>
<tr class="separator:acfb4a10a73c8e2e6ae88bf03f0218e17"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="ac7ce92bbcc94e5782cee25bd392cd76b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7ce92bbcc94e5782cee25bd392cd76b">&#9670;&nbsp;</a></span>_LockWindowStation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> _LockWindowStation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a>&#160;</td>
          <td class="paramname"><em>pwinsta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00743_source.html">logon.c</a> 第 <a class="el" href="a00743_source.html#l00057">57</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;{</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <a class="code" href="a02801.html">PDESKTOP</a> pdesk;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    BOOL fBusy = FALSE;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="comment">     * Make sure the caller is the logon process</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">if</span> (GetCurrentProcessId() != <a class="code" href="a03257.html#ad4b0bbbb1f1fce28a4e874ae6fb92262">gpidLogon</a>) {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_ACCESS_DENIED,</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;                <span class="stringliteral">&quot;Access denied in _LockWindowStation&quot;</span>);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <span class="keywordflow">return</span> WSS_ERROR;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    }</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160; </div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment">     * Prevent desktop switches</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    pwinsta-&gt;<a class="code" href="a02809.html#a4d2f405b1141000eb2af256e0fc8b98b">dwFlags</a> |= WSF_SWITCHLOCK;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">     * Determine whether the station is busy</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    pdesk = pwinsta-&gt;<a class="code" href="a02809.html#aafbda282c78d875d4491cf817366dc1b">rpdeskList</a>;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">while</span> (pdesk != NULL) {</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keywordflow">if</span> (pdesk != pwinsta-&gt;<a class="code" href="a02809.html#ab47ad82730b6b8c717b1444a018bc499">rpdeskLogon</a> &amp;&amp;</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                OBJECT_TO_OBJECT_HEADER(pdesk)-&gt;HandleCount != 0) {</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="comment">             * This desktop is open, thus the station is busy</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;            fBusy = TRUE;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        pdesk = pdesk-&gt;<a class="code" href="a02801.html#ace92d08d0736aef3f0b73273a6e3e5f7">rpdeskNext</a>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160; </div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">if</span> (pwinsta-&gt;<a class="code" href="a02809.html#a4d2f405b1141000eb2af256e0fc8b98b">dwFlags</a> &amp; WSF_SHUTDOWN)</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        pwinsta-&gt;<a class="code" href="a02809.html#a4d2f405b1141000eb2af256e0fc8b98b">dwFlags</a> |= WSF_OPENLOCK;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">     * Unlock opens if the station is busy and is not in the middle</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="comment">     * of shutting down.</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">if</span> (fBusy)</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordflow">return</span> WSS_BUSY;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keywordflow">return</span> WSS_IDLE;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899_source.html#l01758">tagWINDOWSTATION::dwFlags</a>, <a class="el" href="a03257_source.html#l00183">gpidLogon</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a>, <a class="el" href="a00371_source.html#l00119">RIPERR0</a>, <a class="el" href="a00899_source.html#l01746">tagWINDOWSTATION::rpdeskList</a>, <a class="el" href="a00899_source.html#l01747">tagWINDOWSTATION::rpdeskLogon</a> , 以及 <a class="el" href="a00899_source.html#l01709">tagDESKTOP::rpdeskNext</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l05576">NtUserLockWindowStation()</a>.</p>

</div>
</div>
<a id="ad8785904dee45fabf3a42f10fcf9ae8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8785904dee45fabf3a42f10fcf9ae8e">&#9670;&nbsp;</a></span>_RegisterLogonProcess()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _RegisterLogonProcess </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>&#160;</td>
          <td class="paramname"><em>dwProcessId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fSecure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00743_source.html">logon.c</a> 第 <a class="el" href="a00743_source.html#l00025">25</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;{</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    UNREFERENCED_PARAMETER(fSecure);</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">     * Allow only one logon process and then only if it has TCB</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">     * privilege.</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="a03257.html#ad4b0bbbb1f1fce28a4e874ae6fb92262">gpidLogon</a> != 0 || !<a class="code" href="a00839.html#ad5164087ca1b77435e44c75a73c0538f">IsPrivileged</a>(&amp;<a class="code" href="a03266.html#a515921616ee307c5862eb0be3a8e7c1e">psTcb</a>)) {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_ACCESS_DENIED,</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                <span class="stringliteral">&quot;Access denied in _RegisterLogonProcess&quot;</span>);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    }</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <a class="code" href="a03257.html#ad4b0bbbb1f1fce28a4e874ae6fb92262">gpidLogon</a> = (HANDLE)dwProcessId;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03257_source.html#l00183">gpidLogon</a>, <a class="el" href="a00839_source.html#l00554">IsPrivileged()</a>, <a class="el" href="a00839_source.html#l00022">psTcb</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a> , 以及 <a class="el" href="a00371_source.html#l00119">RIPERR0</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l00325">NtUserRegisterLogonProcess()</a>.</p>

</div>
</div>
<a id="acfb4a10a73c8e2e6ae88bf03f0218e17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfb4a10a73c8e2e6ae88bf03f0218e17">&#9670;&nbsp;</a></span>_SetLogonNotifyWindow()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _SetLogonNotifyWindow </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a>&#160;</td>
          <td class="paramname"><em>pwinsta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00743_source.html">logon.c</a> 第 <a class="el" href="a00743_source.html#l00154">154</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;{</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160; </div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;<span class="comment">     * Make sure the caller is the logon process</span></div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordflow">if</span> (GetCurrentProcessId() != <a class="code" href="a03257.html#ad4b0bbbb1f1fce28a4e874ae6fb92262">gpidLogon</a>) {</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_ACCESS_DENIED,</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;                <span class="stringliteral">&quot;Access denied in _SetLogonNotifyWindow&quot;</span>);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    }</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    Lock(&amp;pwinsta-&gt;<a class="code" href="a02809.html#a5734cf57c3cd916ca3c74b17b7c6f39e">spwndLogonNotify</a>, pwnd);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160; </div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03257_source.html#l00183">gpidLogon</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a>, <a class="el" href="a00371_source.html#l00119">RIPERR0</a> , 以及 <a class="el" href="a00899_source.html#l01756">tagWINDOWSTATION::spwndLogonNotify</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l05649">NtUserSetLogonNotifyWindow()</a>.</p>

</div>
</div>
<a id="adc75d55f583d645253b7b2557a64b8df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc75d55f583d645253b7b2557a64b8df">&#9670;&nbsp;</a></span>_UnlockWindowStation()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL _UnlockWindowStation </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a0d80f75801f7be76834d65980cdc857e">PWINDOWSTATION</a>&#160;</td>
          <td class="paramname"><em>pwinsta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00743_source.html">logon.c</a> 第 <a class="el" href="a00743_source.html#l00119">119</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;{</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="comment">     * Make sure the caller is the logon process</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordflow">if</span> (GetCurrentProcessId() != <a class="code" href="a03257.html#ad4b0bbbb1f1fce28a4e874ae6fb92262">gpidLogon</a>) {</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <a class="code" href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a>(ERROR_ACCESS_DENIED,</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;                <a class="code" href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a>,</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;                <span class="stringliteral">&quot;Access denied in _UnlockWindowStation&quot;</span>);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="comment">     * If shutdown is occuring, only remove the switch lock.</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keywordflow">if</span> (pwinsta-&gt;<a class="code" href="a02809.html#a4d2f405b1141000eb2af256e0fc8b98b">dwFlags</a> &amp; WSF_SHUTDOWN)</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        pwinsta-&gt;<a class="code" href="a02809.html#a4d2f405b1141000eb2af256e0fc8b98b">dwFlags</a> &amp;= ~WSF_SWITCHLOCK;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        pwinsta-&gt;<a class="code" href="a02809.html#a4d2f405b1141000eb2af256e0fc8b98b">dwFlags</a> &amp;= ~(WSF_OPENLOCK | WSF_SWITCHLOCK);</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899_source.html#l01758">tagWINDOWSTATION::dwFlags</a>, <a class="el" href="a03257_source.html#l00183">gpidLogon</a>, <a class="el" href="a00371_source.html#l00029">RIP_WARNING</a> , 以及 <a class="el" href="a00371_source.html#l00119">RIPERR0</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a03614_source.html#l05596">NtUserUnlockWindowStation()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa03257_html_ad4b0bbbb1f1fce28a4e874ae6fb92262"><div class="ttname"><a href="a03257.html#ad4b0bbbb1f1fce28a4e874ae6fb92262">gpidLogon</a></div><div class="ttdeci">HANDLE gpidLogon</div><div class="ttdef"><b>Definition:</b> <a href="a03257_source.html#l00183">kernel/globals.c:183</a></div></div>
<div class="ttc" id="aa02801_html"><div class="ttname"><a href="a02801.html">tagDESKTOP</a></div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01703">userk.h:1703</a></div></div>
<div class="ttc" id="aa02809_html_a5734cf57c3cd916ca3c74b17b7c6f39e"><div class="ttname"><a href="a02809.html#a5734cf57c3cd916ca3c74b17b7c6f39e">tagWINDOWSTATION::spwndLogonNotify</a></div><div class="ttdeci">struct tagWND * spwndLogonNotify</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01756">userk.h:1756</a></div></div>
<div class="ttc" id="aa03266_html_a515921616ee307c5862eb0be3a8e7c1e"><div class="ttname"><a href="a03266.html#a515921616ee307c5862eb0be3a8e7c1e">psTcb</a></div><div class="ttdeci">PRIVILEGE_SET psTcb</div><div class="ttdef"><b>Definition:</b> <a href="a00839_source.html#l00022">security.c:22</a></div></div>
<div class="ttc" id="aa00371_html_ae61d954062a9ece52e350e54cad9a23d"><div class="ttname"><a href="a00371.html#ae61d954062a9ece52e350e54cad9a23d">RIPERR0</a></div><div class="ttdeci">#define RIPERR0(idErr, flags, szFmt)</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00119">winerrp.h:119</a></div></div>
<div class="ttc" id="aa02809_html_a4d2f405b1141000eb2af256e0fc8b98b"><div class="ttname"><a href="a02809.html#a4d2f405b1141000eb2af256e0fc8b98b">tagWINDOWSTATION::dwFlags</a></div><div class="ttdeci">DWORD dwFlags</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01758">userk.h:1758</a></div></div>
<div class="ttc" id="aa00371_html_a41f433389f20db57f042022a662e96de"><div class="ttname"><a href="a00371.html#a41f433389f20db57f042022a662e96de">RIP_WARNING</a></div><div class="ttdeci">#define RIP_WARNING</div><div class="ttdef"><b>Definition:</b> <a href="a00371_source.html#l00029">winerrp.h:29</a></div></div>
<div class="ttc" id="aa02801_html_ace92d08d0736aef3f0b73273a6e3e5f7"><div class="ttname"><a href="a02801.html#ace92d08d0736aef3f0b73273a6e3e5f7">tagDESKTOP::rpdeskNext</a></div><div class="ttdeci">struct tagDESKTOP * rpdeskNext</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01709">userk.h:1709</a></div></div>
<div class="ttc" id="aa02809_html_aafbda282c78d875d4491cf817366dc1b"><div class="ttname"><a href="a02809.html#aafbda282c78d875d4491cf817366dc1b">tagWINDOWSTATION::rpdeskList</a></div><div class="ttdeci">struct tagDESKTOP * rpdeskList</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01746">userk.h:1746</a></div></div>
<div class="ttc" id="aa00839_html_ad5164087ca1b77435e44c75a73c0538f"><div class="ttname"><a href="a00839.html#ad5164087ca1b77435e44c75a73c0538f">IsPrivileged</a></div><div class="ttdeci">BOOL IsPrivileged(PPRIVILEGE_SET ppSet)</div><div class="ttdef"><b>Definition:</b> <a href="a00839_source.html#l00554">security.c:554</a></div></div>
<div class="ttc" id="aa02809_html_ab47ad82730b6b8c717b1444a018bc499"><div class="ttname"><a href="a02809.html#ab47ad82730b6b8c717b1444a018bc499">tagWINDOWSTATION::rpdeskLogon</a></div><div class="ttdeci">struct tagDESKTOP * rpdeskLogon</div><div class="ttdef"><b>Definition:</b> <a href="a00899_source.html#l01747">userk.h:1747</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_2a0a56546b70a0973705719e6a88eab3.html">kernel</a></li><li class="navelem"><a class="el" href="a00743.html">logon.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
